package edu.sctu.xuping.month06.subwaysystem;

/**
 *
 * (安检)判断是否是违禁品
 *
 * @author user16
 *
 */
public class PankageHandle {
    private String contrabandGoods ;
    private PeopleInformation peopleInformation;

    public PankageHandle(PeopleInformation peopleInformation,String contrabandGoods) {
        this.peopleInformation = peopleInformation;
        this.contrabandGoods = contrabandGoods;
    }

    public boolean checkPankage() {
        SetPeopleData peopledata = new SetPeopleData();
        boolean is_contrabandGoods = false;
        if (peopledata.setPeopleData().get(0).isIs_Package()) {
            if (contrabandGoods.contains(peopleInformation.getPackageName()))
                is_contrabandGoods = true;
        }
        else {
            is_contrabandGoods = false;
        }

        return is_contrabandGoods;

    }
    public boolean checkWater(){
        boolean is_contrabandGoods = false;
        if(peopleInformation.isIs_Water()){
                is_contrabandGoods = true;
            }else{
                is_contrabandGoods = false;
            }


        return is_contrabandGoods;
    }
}
